import { defineStore } from 'pinia'

type WorkerStatus = 'pending' | 'working' | 'completed'

type State = {
  workerProgress: number
  workerStatus: WorkerStatus
}

export const useRestaurantStore = defineStore('restaurant', {
  state: (): State => ({
    workerProgress: 0,
    workerStatus: 'pending',
  }),
  getters: {},
  actions: {
    setWorkerProgress(val: number) {
      this.workerProgress = val
    },
  },
  persist: {
    key: 'useRestaurantStore',
    pick: [],
  },
})
